/*
 * @Author: Bo Cai
 * @Mail: caibo0520@qq.com
 * @Date: 2021-11-20 14:39:30
 * @LastEditors: Bo Cai
 * @LastEditTime: 2021-12-19 22:52:11
 */
import request from '@/utils/request'

export default {
  //修改用户信息
  updateById (userForm) {
    return request({
      url: `/api/qingdong/user_center/update_user_info`,
      method: 'post',
      data: userForm
    })
  },
  //根据邮箱发送验证码邮件
  sendVerificationCode (mailUrl) {
    return request({
      url: `/api/qingdong/user_center/send_email_verification_code_4_change_email?email=${mailUrl}`,
      method: 'get'
    })
  },
  update_email (email, code) {
    return request(
      {
        url: '/api/qingdong/user_center/update_email',
        method: 'post',
        data: {
          email: email,
          code: code,
        }
      }
    )
  },
  submit_campus_identity (campus_identity) {
    return request({
      url: '/api/qingdong/user_center/update_campus_identity',
      method: 'post',
      data: campus_identity,
    })
  }
}
